home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Compilers⁄Interps / GCC-2.3.3r12 / Targets / 88k / tm.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-12  |  6.8 KB  |  193 lines  |  [TEXT/MPS ]

  1. /* Definitions of target machine for GNU compiler.
  2.    Motorola m88100 running DG/UX.
  3.    Copyright (C) 1988, 1989, 1990, 1991 Free Software Foundation, Inc.
  4.    Contributed by Michael Tiemann (tiemann@mcc.com)
  5.    Enhanced by Michael Meissner (meissner@osf.org)
  6.    Currently supported by Tom Wood (wood@dg-rtp.dg.com)
  7.  
  8. This file is part of GNU CC.
  9.  
  10. GNU CC is free software; you can redistribute it and/or modify
  11. it under the terms of the GNU General Public License as published by
  12. the Free Software Foundation; either version 2, or (at your option)
  13. any later version.
  14.  
  15. GNU CC is distributed in the hope that it will be useful,
  16. but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18. GNU General Public License for more details.
  19.  
  20. You should have received a copy of the GNU General Public License
  21. along with GNU CC; see the file COPYING.  If not, write to
  22. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  23.  
  24. /* You're not seeing double!  To transition to dwarf debugging, both are
  25.    supported.  The option -msvr4 and -mversion-03.00 specify (for DG/UX)
  26.    `real' elf.  With these combinations, -g means dwarf.  */
  27. /* DWARF_DEBUGGING_INFO defined in svr4.h.  */
  28. #ifndef MPW_RP88
  29. #define SDB_DEBUGGING_INFO
  30. #endif
  31. #define PREFERRED_DEBUGGING_TYPE \
  32.   (GET_VERSION_0300_SYNTAX ? DWARF_DEBUG : SDB_DEBUG)
  33.  
  34. #ifndef NO_BUGS
  35. #define AS_BUG_IMMEDIATE_LABEL
  36. /* The DG/UX 4.30 assembler doesn't accept the symbol `fcr63'.  */
  37. #define AS_BUG_FLDCR
  38. #endif
  39.  
  40. #include "svr4.h"
  41. #include "m88k.h"
  42.  
  43. /* Augment TARGET_SWITCHES with the MXDB options.  */
  44. #define MASK_STANDARD        0x40000000 /* Retain standard information */
  45. #define MASK_LEGEND        0x20000000 /* Retain legend information */
  46. #define MASK_EXTERNAL_LEGEND    0x10000000 /* Make external legends */
  47.  
  48. #define TARGET_STANDARD          (target_flags & MASK_STANDARD)
  49. #define TARGET_LEGEND          (target_flags & MASK_LEGEND)
  50. #define TARGET_EXTERNAL_LEGEND      (target_flags & MASK_EXTERNAL_LEGEND)
  51.  
  52. #undef  SUBTARGET_SWITCHES
  53. #define SUBTARGET_SWITCHES \
  54.     { "standard",             MASK_STANDARD }, \
  55.     { "legend",                 MASK_LEGEND }, \
  56.     { "external-legend",         MASK_EXTERNAL_LEGEND }, \
  57.     /* the following is used only in the *_SPEC's */ \
  58.     { "keep-coff",             0 },
  59.  
  60. /* Default switches */
  61. #undef    TARGET_DEFAULT
  62. #ifdef MPW_RP88
  63. #define TARGET_DEFAULT (0)
  64. #else
  65. #define TARGET_DEFAULT    (MASK_CHECK_ZERO_DIV     | \
  66.              MASK_OCS_DEBUG_INFO     | \
  67.              MASK_OCS_FRAME_POSITION)
  68. #endif
  69. #undef    CPU_DEFAULT
  70. #define CPU_DEFAULT MASK_88000
  71.  
  72. /* Macros to be automatically defined.  __svr4__ is our extension.
  73.    __CLASSIFY_TYPE__ is used in the <varargs.h> and <stdarg.h> header
  74.    files with DG/UX revision 5.40 and later.  This allows GNU CC to
  75.    operate without installing the header files.  */
  76.  
  77. #undef    CPP_PREDEFINES
  78. #define CPP_PREDEFINES "-Dm88000 -Dm88k -Dunix -DDGUX -D__CLASSIFY_TYPE__=2\
  79.    -D__svr4__ -Asystem(unix) -Acpu(m88k) -Amachine(m88k)"
  80.  
  81. /* If -m88100 is in effect, add -Dm88100; similarly for -m88110.
  82.    Here, the CPU_DEFAULT is assumed to be -m88000.  If not -ansi,
  83.    -traditional, or restricting include files to one specific source
  84.    target, specify full DG/UX features.  */
  85. #undef    CPP_SPEC
  86. #define    CPP_SPEC "%{!m88000:%{!m88100:%{m88110:-D__m88110__}}} \
  87.           %{!m88000:%{!m88110:%{m88100:-D__m88100__}}} \
  88.           %{!ansi:%{!traditional:-D__OPEN_NAMESPACE__}}"
  89.  
  90. /* Assembler support (-V, silicon filter, legends for mxdb).  */
  91. #undef    ASM_SPEC
  92. #define ASM_SPEC "\
  93. %{V} %{v:%{!V:-V}} %{pipe: - %{msvr4:%{mversion-03.00:-KV3}}}\
  94. %{!mlegend:%{mstandard:-Wc,off}}\
  95. %{mlegend:-Wc,-fix-bb,-h\"gcc-2.2.14\",-s\"%i\"\
  96. %{traditional:,-lc}%{!traditional:,-lansi-c}\
  97. %{mstandard:,-keep-std}\
  98. %{mkeep-coff:,-keep-coff}\
  99. %{mexternal-legend:,-external}\
  100. %{mocs-frame-position:,-ocs}}"
  101.  
  102. /* Override svr4.h.  */
  103. #undef    ASM_FINAL_SPEC
  104. #undef    STARTFILE_SPEC
  105.  
  106. /* Linker and library spec's.
  107.    -static, -shared, -symbolic, -h* and -z* access AT&T V.4 link options.
  108.    -svr4 instructs gcc to place /usr/lib/values-X[cat].o on link the line.
  109.    When the -G link option is used (-shared and -symbolic) a final link is
  110.    not being done.  */
  111. #undef    LIB_SPEC
  112. #define LIB_SPEC "%{!shared:%{!symbolic:-lc}}"
  113. #undef    LINK_SPEC
  114. #define LINK_SPEC "%{z*} %{h*} %{V} %{v:%{!V:-V}} \
  115.            %{static:-dn -Bstatic} \
  116.            %{shared:-G -dy} \
  117.            %{symbolic:-Bsymbolic -G -dy} \
  118.            %{pg:-L/usr/lib/libp}%{p:-L/usr/lib/libp}"
  119. #undef    STARTFILE_SPEC
  120. #define STARTFILE_SPEC "%{!shared:%{!symbolic:%{pg:gcrt0.o%s} \
  121.              %{!pg:%{p:/lib/mcrt0.o}%{!p:/lib/crt0.o}} \
  122.              %{svr4:%{ansi:/lib/values-Xc.o} \
  123.               %{!ansi:%{traditional:/lib/values-Xt.o} \
  124.                %{!traditional:/usr/lib/values-Xa.o}}}}}"
  125.  
  126. #undef    GPLUSPLUS_INCLUDE_DIR
  127. #define GPLUSPLUS_INCLUDE_DIR "/usr/opt/g++/lib/g++-include"
  128.  
  129. /* Fast DG/UX version of profiler that does not require lots of
  130.    registers to be stored.  */
  131. #undef    FUNCTION_PROFILER
  132. #define FUNCTION_PROFILER(FILE, LABELNO) \
  133.   output_function_profiler (FILE, LABELNO, "gcc.mcount", 0)
  134.  
  135. /* DGUX V.4 isn't quite ELF--yet.  */
  136. #undef  VERSION_0300_SYNTAX
  137. #define VERSION_0300_SYNTAX (TARGET_SVR4 && m88k_version_0300)
  138.  
  139. /* Same, but used before OVERRIDE_OPTIONS has been processed.  */
  140. #define GET_VERSION_0300_SYNTAX \
  141.   (TARGET_SVR4 && m88k_version != 0 && strcmp (m88k_version, "03.00") >= 0)
  142.  
  143. /* Output the legend info for mxdb when debugging except if standard
  144.    debugging information only is explicitly requested.  */
  145. #undef  ASM_FIRST_LINE
  146. #define ASM_FIRST_LINE(FILE)                        \
  147.   do {                                    \
  148.     if (VERSION_0300_SYNTAX)                        \
  149.       fprintf (FILE, "\t%s\t \"03.00\"\n", VERSION_ASM_OP);        \
  150.     if (write_symbols != NO_DEBUG                    \
  151.     && ! (TARGET_STANDARD && ! TARGET_LEGEND))            \
  152.       {                                    \
  153.     fprintf (FILE, ";legend_info -fix-bb -h\"gcc-%s\" -s\"%s\"",    \
  154.          VERSION_STRING, main_input_filename);            \
  155.     fputs (flag_traditional ? " -lc" : " -lansi-c", FILE);        \
  156.     if (TARGET_STANDARD)                        \
  157.       fputs (" -keep-std", FILE);                    \
  158.     if (TARGET_EXTERNAL_LEGEND)                    \
  159.       fputs (" -external", FILE);                    \
  160.     if (TARGET_OCS_FRAME_POSITION)                    \
  161.       fputs (" -ocs", FILE);                    \
  162.     fputc ('\n', FILE);                        \
  163.       }                                    \
  164.   } while (0)
  165.  
  166. /* Override svr4.h.  */
  167. #undef PTRDIFF_TYPE
  168. #undef WCHAR_TYPE
  169. #undef WCHAR_TYPE_SIZE
  170.  
  171. /* Override svr4.h and m88k.h except when compiling crtstuff.c.  */
  172. #if !defined (CRT_BEGIN) && !defined (CRT_END)
  173. #if 0 /* The SVR4 init method doesn't yet work.  */
  174. #undef    INIT_SECTION_ASM_OP
  175. #define INIT_SECTION_ASM_OP (VERSION_0300_SYNTAX        \
  176.                  ? "section\t .init,\"xa\""    \
  177.                  : "section\t .init,\"x\"")
  178. #endif
  179. #undef    CTORS_SECTION_ASM_OP
  180. #define CTORS_SECTION_ASM_OP (VERSION_0300_SYNTAX        \
  181.                   ? "section\t .ctors,\"aw\""    \
  182.                   : "section\t .ctors,\"d\"")
  183. #undef    DTORS_SECTION_ASM_OP
  184. #define DTORS_SECTION_ASM_OP (VERSION_0300_SYNTAX        \
  185.                   ? "section\t .dtors,\"aw\""    \
  186.                   : "section\t .dtors,\"d\"")
  187. #endif /* crtstuff.c */
  188.  
  189. #ifdef MPW_RP88
  190. #define APPLE_DEFAULT 0
  191.  
  192. #define DEFAULT_INCLUDE_ENV "CIncludes88"
  193. #endif